package com.ys.erp.stage_mall_service.bean.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author lwj
 * @date 2025/5/19
 */
@Data
@Schema(description = "订单详情返回对象")
public class OrderDetailVO {


    @Schema(description = "id")
    private Long id;

    @Schema(description = "订单类型0实物 1虚拟卡卷，2到店订单")
    private Integer orderType;

    @Schema(description = "订单编号")
    private String orderSerialNumber;

    @Schema(description = "用户id")
    private Long userId;

    @Schema(description = "下单时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime orderTime;

    @Schema(description = "订单状态0待付款，1已付款代发货，2：已发货待收货，3：已收货, 4：已完成")
    private Integer orderStatus;

    @Schema(description = "是否取消")
    private Integer isCancel;

    @Schema(description = "是否当面付")
    private Integer isPersonPay;

    @Schema(description = "支付类型")
    private String payType;

    @Schema(description = "幺币支付金额")
    private String ysPayMoney;

    @Schema(description = "微信支付金额")
    private String wxPayMoney;

    @Schema(description = "支付钱包编号")
    private String payCatCode;

    @Schema(description = "订单取消时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime cancelTime;

    @Schema(description = "支付时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime payTime;

    @Schema(description = "发货时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime sendGoodsTime;

    @Schema(description = "收货时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime deliveryTime;

    @Schema(description = "完成时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime completeTime;

    @Schema(description = "支付id")
    private Long orderPayId;

    @Schema(description = "订单总额")
    private String totalMoney;

    @Schema(description = "商品总额")
    private String goodsTotalMoney;

    @Schema(description = "折扣金额")
    private String discountMoney;

    @Schema(description = "幺豆抵扣")
    private String ysPulseMoney;

    @Schema(description = "幺豆抵扣数量")
    private String ysPulseNum;

    @Schema(description = "实际支付费用")
    private String actualMoney;

    @Schema(description = "物流费用")
    private String freightMoney;

    @Schema(description = "订单备注")
    private String orderRemark;

    @Schema(description = "快递名字")
    private String expressName;

    @Schema(description = "快递id")
    private String expressId;

    @Schema(description = "收货人")
    private String deliveryName;

    @Schema(description = "物流手机号")
    private String deliveryPhone;

    @Schema(description = "物流省")
    private String deliveryProvince;

    @Schema(description = "物流市")
    private String deliveryCity;

    @Schema(description = "物流区")
    private String deliveryDistrict;

    @Schema(description = "物流详细地址")
    private String deliveryDetail;

    @Schema(description = "用户是否申请取消，0否1是")
    private Integer isUserCancel;

    @Schema(description = "用户取消状态0,用户发起取消，1已通过，2已拒绝")
    private Integer userCancelStatus;

    @Schema(description = "用户取消申请拒绝备注")
    private String userCancelRejectRemark;

    @Schema(description = "订单下商品")
    private List<OrderGoodsVO> orderGoodsList;

    @Schema(description = "用户信息")
    private OrderDetailVO.OrderUserVO user;

    @Schema(description = "用户备注")
    private String userRemark;

    @Schema(description = "当面付门店")
    private String personPayShopName;

    @Schema(description = "发货门店")
    private String sendShopName;

    @Schema(description = "物流类型0：快递配送，1：到店自提，2:自动发货")
    private Integer deliveryType;

    @Data
    @Schema(description = "订单用户返回对象")
    public static class OrderUserVO {

        @Schema(description = "userId")
        private Long id;

        @Schema(description = "昵称")
        private String nickName;

        @Schema(description = "头像")
        private String avatar;

        @Schema(description = "手机号")
        private String phone;

    }

}
